package de.greenrobot.daoexample.model;

import android.support.annotation.NonNull;

import java.io.Serializable;

/**
 * Created by squall on 2017/4/21.
 */

public class CircleEnterStatistics implements Serializable, Comparable<CircleEnterStatistics> {

    private String name;
    private String id;
    private long enterTime;
    private String type;
    private int count;
    private String cover;
    private String tag_id;
    private String real_name;
    private String tag_name;

    public CircleEnterStatistics(String name, String id, long enterTime, String type, String cover) {
        this.name = name;
        this.id = id;
        this.enterTime = enterTime;
        this.type = type;
        this.cover = cover;
    }


    public String getName() {
        return name;
    }

    public String getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setId(String id) {
        this.id = id;
    }


    public long getEnterTime() {
        return enterTime;
    }

    public void setEnterTime(long enterTime) {
        this.enterTime = enterTime;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getTag_id() {
        return tag_id;
    }

    public String getReal_name() {
        return real_name;
    }

    public String getTag_name() {
        return tag_name;
    }

    public void setTag_id(String tag_id) {
        this.tag_id = tag_id;
    }

    public void setReal_name(String real_name) {
        this.real_name = real_name;
    }

    public void setTag_name(String tag_name) {
        this.tag_name = tag_name;
    }

    @Override
    public int compareTo(@NonNull CircleEnterStatistics another) {
        long time1 = this.enterTime;
        long count1 = this.count;
        if (count1 > another.count) {
            return -1;
        } else if (count1 == another.count) {
            if (time1 > another.enterTime) {
                return -1;
            } else if (time1 == another.enterTime) {
                return 0;
            } else {
                return 1;
            }
        } else {
            return 1;
        }
    }
}
